<?php defined('IN_NWIDC') or exit('Access Invalid!'); ?>

<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <h3><?php echo $lang['web_set']; ?></h3>
            <ul class="tab-base">
                <li><a class="current"><span>站点设置</span></a></li>
                <li>
                    <a href="index.php?act=setting&op=dump"><span>防灌水设置</span></a>
                </li>

            </ul>
        </div>
    </div>
    <div class="fixed-empty"></div>
    <form method="post" enctype="multipart/form-data" name="form1">
        <input type="hidden" name="form_submit" value="ok"/>
        <table class="table tb-type2">
            <tbody>
            <tr class="noborder">
                <td colspan="2" class="required"><label for="site_name"><?php echo $lang['web_name']; ?>:</label></td>
            </tr>
            <tr class="noborder">
                <td class="vatop rowform"><input id="site_name" name="site_name"
                                                 value="<?php echo $output['list_setting']['site_name']; ?>" class="txt"
                                                 type="text"/></td>
                <td class="vatop tips"><span class="vatop rowform"><?php echo $lang['web_name_notice']; ?></span></td>
            </tr>
            <tr>
                <td colspan="2" class="required"><label for="site_logo"><?php echo $lang['site_logo']; ?>:</label></td>
            </tr>
            <tr class="noborder">
                <td class="vatop rowform"><span class="type-file-show"><img class="show_image"
                                                                            src="<?php echo ADMIN_TEMPLATES_URL; ?>/images/preview.png">
            <div class="type-file-preview"><img style="max-width: 200px"
                                                src="<?php echo UPLOAD_SITE_URL . '/' . (ATTACH_COMMON . DS . $output['list_setting']['site_logo']); ?>"></div>
            </span><span class="type-file-box"><input type='text' name='textfield' id='textfield1'
                                                      class='type-file-text'/><input type='button' name='button'
                                                                                     id='button1' value=''
                                                                                     class='type-file-button'/>
            <input name="site_logo" type="file" class="type-file-file" id="site_logo" size="30" hidefocus="true"
                   nc_type="change_site_logo">
            </span></td>
                <td class="vatop tips"><span class="vatop rowform">默认网站LOGO,通用头部显示，最佳显示尺寸为165*85像素</span></td>
            </tr>
            <?php
            if (C('open_mobile')) {
                ?>
                <tr>
                    <td colspan="2" class="required"><label for="mobile_right">手机站右侧标语:</label></td>
                </tr>
                <tr class="noborder">
                    <td class="vatop rowform"><input id="mobile_right" name="mobile_right"
                                                     value="<?php echo $output['list_setting']['mobile_right']; ?>"
                                                     class="txt" type="text"/></td>
                    <td class="vatop tips"><span class="vatop rowform"></span></td>
                </tr>

                <tr>
                    <td colspan="2" class="required"><label for="service_phone">服务热线:</label></td>
                </tr>
                <tr class="noborder">
                    <td class="vatop rowform"><input id="service_phone" name="service_phone"
                                                     value="<?php echo $output['list_setting']['service_phone']; ?>"
                                                     class="txt" type="text"/></td>
                    <td class="vatop tips"><span class="vatop rowform"></span></td>
                </tr>

                <tr>
                    <td colspan="2" class="required"><label for="footer_msg">版权标语:</label></td>
                </tr>
                <tr class="noborder">
                    <td class="vatop rowform"><input id="footer_msg" name="footer_msg"
                                                     value="<?php echo $output['list_setting']['footer_msg']; ?>"
                                                     class="txt" type="text"/></td>
                    <td class="vatop tips"><span class="vatop rowform"></span></td>
                </tr>

                <?php
            }
            ?>

            <tr style='display:none;'>
                <td colspan="2" class="required"><label for="site_logo"><?php echo $lang['member_logo']; ?>:</label>
                </td>
            </tr>
            <tr class="noborder" style='display:none;'>
                <td class="vatop rowform"><span class="type-file-show"><img class="show_image"
                                                                            src="<?php echo ADMIN_TEMPLATES_URL; ?>/images/preview.png">
            <div class="type-file-preview"><img
                        src="<?php echo UPLOAD_SITE_URL . '/' . (ATTACH_COMMON . DS . $output['list_setting']['member_logo']); ?>"></div>
            </span><span class="type-file-box"><input type='text' name='textfield2' id='textfield2'
                                                      class='type-file-text'/><input type='button' name='button2'
                                                                                     id='button2' value=''
                                                                                     class='type-file-button'/>
            <input name="member_logo" type="file" class="type-file-file" id="member_logo" size="30" hidefocus="true"
                   nc_type="change_member_logo">
            </span></td>
                <td class="vatop tips"><span class="vatop rowform">网站小尺寸LOGO，会员个人主页显示，最佳显示尺寸为200*40像素</span></td>
            </tr>
            <!-- 商家中心logo -->
            <tr style='display:none;'>
                <td colspan="2" class="required"><label for="seller_center_logo">商家中心Logo:</label></td>
            </tr>
            <tr class="noborder" style='display:none;'>
                <td class="vatop rowform"><span class="type-file-show"><img class="show_image"
                                                                            src="<?php echo ADMIN_TEMPLATES_URL; ?>/images/preview.png">
            <div class="type-file-preview"><img
                        src="<?php echo UPLOAD_SITE_URL . '/' . (ATTACH_COMMON . DS . $output['list_setting']['seller_center_logo']); ?>"></div>
            </span><span class="type-file-box"><input type='text' name='textfield' id='textfield3'
                                                      class='type-file-text'/><input type='button' name='button'
                                                                                     id='button1' value=''
                                                                                     class='type-file-button'/>
            <input name="seller_center_logo" type="file" class="type-file-file" id="seller_center_logo" size="30"
                   hidefocus="true" nc_type="change_seller_center_logo">
            </span></td>
                <td class="vatop tips"><span class="vatop rowform">商家中心LOGO，最佳显示尺寸为150*40像素，请根据背景色选择使用图片色彩</span></td>
            </tr>
            <!-- 商家中心logo -->
            <tr>
                <td colspan="2" class="required"><label for="icp_number"><?php echo $lang['icp_number']; ?>:</label>
                </td>
            </tr>
            <tr class="noborder">
                <td class="vatop rowform"><input id="icp_number" name="icp_number"
                                                 value="<?php echo $output['list_setting']['icp_number']; ?>"
                                                 class="txt" type="text"/></td>
                <td class="vatop tips"><span class="vatop rowform"><?php echo $lang['icp_number_notice']; ?></span></td>
            </tr>
            <tr>
                <td colspan="2" class="required"><label for="website_qq">网站客服:</label></td>
            </tr>
            <tr class="noborder">
                <td class="vatop rowform"><input id="website_qq" name="website_qq"
                                                 value="<?php echo $output['list_setting']['website_qq']; ?>"
                                                 class="txt" type="text"/></td>
                <td class="vatop tips"><span class="vatop rowform"></span></td>
            </tr>
            <tr>
                <td colspan="2" class="required"><label for="site_phone"><?php echo $lang['site_phone']; ?>:</label>
                </td>
            </tr>
            <tr class="noborder">
                <td class="vatop rowform"><input id="site_phone" name="site_phone"
                                                 value="<?php echo $output['list_setting']['site_phone']; ?>"
                                                 class="txt" type="text"/></td>
                <td class="vatop tips"><span class="vatop rowform"><?php echo $lang['site_phone_notice']; ?></span></td>
            </tr>

            <tr>
                <td colspan="2" class="required"><label for="site_email"><?php echo $lang['site_email']; ?>:</label>
                </td>
            </tr>
            <tr class="noborder">
                <td class="vatop rowform"><input id="site_email" name="site_email"
                                                 value="<?php echo $output['list_setting']['site_email']; ?>"
                                                 class="txt" type="text"/></td>
                <td class="vatop tips"><span class="vatop rowform"><?php echo $lang['site_email_notice']; ?></span></td>
            </tr>
            <tr>
                <td colspan="2" class="required"><label for="statistics_code"><?php echo $lang['flow_static_code']; ?>
                        :</label></td>
            </tr>
            <tr class="noborder">
                <td class="vatop rowform"><textarea name="statistics_code" rows="6" class="tarea"
                                                    id="statistics_code"><?php echo $output['list_setting']['statistics_code']; ?></textarea>
                </td>
                <td class="vatop tips"><span
                            class="vatop rowform"><?php echo $lang['flow_static_code_notice']; ?></span></td>
            </tr>


            <tr>
                <td colspan="2" class='required'>
                    <label for="iconfont">是否启用行邮税：</label>
                </td>
            </tr>
            <tr class="noborder">
                <td class="vatop rowform onoff"><label for="site_status1"
                                                       class="cb-enable <?php if ($output['list_setting']['open_tax'] == '1') { ?>selected<?php } ?>"><span><?php echo $lang['open']; ?></span></label>
                    <label for="site_status0"
                           class="cb-disable <?php if ($output['list_setting']['open_tax'] == '0') { ?>selected<?php } ?>"><span><?php echo $lang['close']; ?></span></label>
                    <input id="site_status1" name="open_tax"
                           <?php if ($output['list_setting']['open_tax'] == '1'){ ?>checked="checked"<?php } ?>
                           value="1" type="radio">
                    <input id="site_status0" name="open_tax"
                           <?php if ($output['list_setting']['open_tax'] == '0'){ ?>checked="checked"<?php } ?>
                           value="0" type="radio"></td>
                <td class="vatop tips"><span class="vatop rowform">开启后行邮税的设置才会生效</span></td>
            </tr>

            <tr>
                <td colspan="2" class='required'>
                    <label for="iconfont">行邮税起征额度1：</label>
                </td>
            </tr>
            <tr class="noborder">
                <td class="vatop rowform"><input id="tax_start" name="tax_start"
                                                 value="<?php echo $output['list_setting']['tax_start']; ?>" class="txt"
                                                 type="text"/></td>
                <td class="vatop tips"><span class="vatop rowform">一张订单中保税商品的总金额超过这个数值，会计算行邮税。</span></td>
            </tr>

            <tr>
                <td colspan="2" class='required'>
                    <label for="iconfont">行邮税起征额度2：</label>
                </td>
            </tr>
            <tr class="noborder">
                <td class="vatop rowform"><input id="tax_start_else" name="tax_start_else"
                                                 value="<?php echo $output['list_setting']['tax_start_else']; ?>"
                                                 class="txt" type="text"/></td>
                <td class="vatop tips"><span class="vatop rowform">一张订单中保税商品的税金额超过这个数值，会计算行邮税。</span></td>
            </tr>

            <tr>
                <td colspan="2" class='required'>
                    <label for="iconfont">行邮税计算公式：</label>
                </td>
            </tr>
            <tr class="noborder">
                <td class="vatop rowform"><input id="tax_formula" name="tax_formula"
                                                 value="<?php echo $output['list_setting']['tax_formula']; ?>"
                                                 class="txt" type="text"/></td>
                <td class="vatop tips"><span class="vatop rowform">
            {source_price}表示成本价格，{goods_price}表示销售价格，{rate}表示税率（百分制），最好不要两个同时使用！
          </span>
                </td>
            </tr>

            <tr>
                <td colspan="2" class='required'>
                    <label for="iconfont">是否启用商家入驻：</label>
                </td>
            </tr>
            <tr class="noborder">
                <td class="vatop rowform onoff"><label for="open_store1"
                                                       class="cb-enable <?php if ($output['list_setting']['open_store'] == '1') { ?>selected<?php } ?>"><span><?php echo $lang['open']; ?></span></label>
                    <label for="open_store0"
                           class="cb-disable <?php if ($output['list_setting']['open_store'] == '0') { ?>selected<?php } ?>"><span><?php echo $lang['close']; ?></span></label>
                    <input id="open_store1" name="open_store"
                           <?php if ($output['list_setting']['open_store'] == '1'){ ?>checked="checked"<?php } ?>
                           value="1" type="radio">
                    <input id="open_store0" name="open_store"
                           <?php if ($output['list_setting']['open_store'] == '0'){ ?>checked="checked"<?php } ?>
                           value="0" type="radio"></td>
                <td class="vatop tips"><span class="vatop rowform"></span></td>
            </tr>

            <tr>
                <td colspan="2" class='required'>
                    <label for="iconfont">是否启用访客购买（完税）：</label>
                </td>
            </tr>
            <tr class="noborder">
                <td class="vatop rowform onoff"><label for="guest_buy1"
                                                       class="cb-enable <?php if ($output['list_setting']['guest_buy'] == '1') { ?>selected<?php } ?>"><span><?php echo $lang['open']; ?></span></label>
                    <label for="guest_buy0"
                           class="cb-disable <?php if ($output['list_setting']['guest_buy'] == '0') { ?>selected<?php } ?>"><span><?php echo $lang['close']; ?></span></label>
                    <input id="guest_buy1" name="guest_buy"
                           <?php if ($output['list_setting']['guest_buy'] == '1'){ ?>checked="checked"<?php } ?>
                           value="1" type="radio">
                    <input id="guest_buy0" name="guest_buy"
                           <?php if ($output['list_setting']['guest_buy'] == '0'){ ?>checked="checked"<?php } ?>
                           value="0" type="radio"></td>
                <td class="vatop tips"><span class="vatop rowform"></span></td>
            </tr>


            <tr>
                <td colspan="2" class='required'>
                    <label for="iconfont">是否启用买家限制：</label>
                </td>
            </tr>
            <tr class="noborder">
                <td class="vatop rowform onoff"><label for="buyer_limit1"
                                                       class="cb-enable <?php if ($output['list_setting']['buyer_limit'] == '1') { ?>selected<?php } ?>"><span><?php echo $lang['open']; ?></span></label>
                    <label for="buyer_limit0"
                           class="cb-disable <?php if ($output['list_setting']['buyer_limit'] == '0') { ?>selected<?php } ?>"><span><?php echo $lang['close']; ?></span></label>
                    <input id="buyer_limit1" name="buyer_limit"
                           <?php if ($output['list_setting']['buyer_limit'] == '1'){ ?>checked="checked"<?php } ?>
                           value="1" type="radio">
                    <input id="buyer_limit0" name="buyer_limit"
                           <?php if ($output['list_setting']['buyer_limit'] == '0'){ ?>checked="checked"<?php } ?>
                           value="0" type="radio"></td>
                <td class="vatop tips"><span class="vatop rowform">开启后可以设置买家每天下订单的数目和金额</span></td>
            </tr>

            <tr>
                <td colspan="2" class='required'>
                    <label for="iconfont">订单后缀标识：</label>
                </td>
            </tr>
            <tr class="noborder">
                <td class="vatop rowform"><input id="order_mark" name="order_mark"
                                                 value="<?php echo $output['list_setting']['order_mark']; ?>"
                                                 class="txt" type="text"/></td>
                <td class="vatop tips"><span class="vatop rowform">用于区别不同平台订单号</span></td>
            </tr>

            <tr>
                <td colspan="2" class='required'>
                    <label for="iconfont">订单数目限制：</label>
                </td>
            </tr>
            <tr class="noborder">
                <td class="vatop rowform"><input id="order_max_num" name="order_max_num"
                                                 value="<?php echo $output['list_setting']['order_max_num']; ?>"
                                                 class="txt" type="text"/></td>
                <td class="vatop tips"><span class="vatop rowform">同一个用户每天含保税商品订单个数上限。</span></td>
            </tr>

            <tr>
                <td colspan="2" class='required'>
                    <label for="iconfont">订单总金额限制：</label>
                </td>
            </tr>
            <tr class="noborder">
                <td class="vatop rowform"><input id="order_max_money" name="order_max_money"
                                                 value="<?php echo $output['list_setting']['order_max_money']; ?>"
                                                 class="txt" type="text"/></td>
                <td class="vatop tips"><span class="vatop rowform">
            同一个用户每天含保税商品订单总金额的上限。
          </span>
                </td>
            </tr>


            <tr>
                <td colspan="2" class='required'>
                    <label for="iconfont">金牌代理价格计算公式：</label>
                </td>
            </tr>
            <tr class="noborder">
                <td class="vatop rowform"><input id="gold_formula" name="gold_formula"
                                                 value="<?php echo $output['list_setting']['gold_formula']; ?>"
                                                 class="txt" type="text"/></td>
                <td class="vatop tips"><span class="vatop rowform">
            {price}表示基础价格（计算所有优惠前的价格）
          </span>
                </td>
            </tr>

            <tr>
                <td colspan="2" class='required'>
                    <label for="iconfont">代理商业绩计算系数：</label>
                </td>
            </tr>
            <tr class="noborder">
                <td class="vatop rowform"><input id="proxy_coefficient" name="proxy_coefficient"
                                                 value="<?php echo $output['list_setting']['proxy_coefficient']; ?>"
                                                 class="txt" type="text"/></td>
                <td class="vatop tips"><span class="vatop rowform">
            请使用“系数名|系数值”设置，用半角逗号隔开
          </span>
                </td>
            </tr>

            <tr>
                <td colspan="2" class='required'>
                    <label for="iconfont">是否开启订单拆分：</label>
                </td>
            </tr>
            <tr class="noborder">
                <td class="vatop rowform onoff"><label for="order_split1"
                                                       class="cb-enable <?php if ($output['list_setting']['order_split'] == '1') { ?>selected<?php } ?>"><span><?php echo $lang['open']; ?></span></label>
                    <label for="order_split0"
                           class="cb-disable <?php if ($output['list_setting']['order_split'] == '0') { ?>selected<?php } ?>"><span><?php echo $lang['close']; ?></span></label>
                    <input id="order_split1" name="order_split"
                           <?php if ($output['list_setting']['order_split'] == '1'){ ?>checked="checked"<?php } ?>
                           value="1" type="radio">
                    <input id="order_split0" name="order_split"
                           <?php if ($output['list_setting']['order_split'] == '0'){ ?>checked="checked"<?php } ?>
                           value="0" type="radio"></td>
                <td class="vatop tips"><span class="vatop rowform"></span></td>
            </tr>

            <tr>
                <td colspan="2" class='required'>
                    <label for="iconfont">是否提醒买家拆分订单：</label>
                </td>
            </tr>
            <tr class="noborder">
                <td class="vatop rowform onoff"><label for="manual_split1"
                                                       class="cb-enable <?php if ($output['list_setting']['manual_split'] == '1') { ?>selected<?php } ?>"><span><?php echo $lang['open']; ?></span></label>
                    <label for="manual_split0"
                           class="cb-disable <?php if ($output['list_setting']['manual_split'] == '0') { ?>selected<?php } ?>"><span><?php echo $lang['close']; ?></span></label>
                    <input id="manual_split1" name="manual_split"
                           <?php if ($output['list_setting']['manual_split'] == '1'){ ?>checked="checked"<?php } ?>
                           value="1" type="radio">
                    <input id="manual_split0" name="manual_split"
                           <?php if ($output['list_setting']['manual_split'] == '0'){ ?>checked="checked"<?php } ?>
                           value="0" type="radio"></td>
                <td class="vatop tips"><span class="vatop rowform">只有订单拆分开启了该项才会有效</span></td>
            </tr>

            <tr>
                <td colspan="2" class='required'>
                    <label for="iconfont">订单拆分限额：</label>
                </td>
            </tr>
            <tr class="noborder">
                <td class="vatop rowform"><input id="split_limit" name="split_limit"
                                                 value="<?php echo $output['list_setting']['split_limit']; ?>"
                                                 class="txt" type="text"/></td>
                <td class="vatop tips"><span class="vatop rowform">
            订单商品行邮税超过该值才触发拆分
          </span>
                </td>
            </tr>

            <!--        <tr>-->
            <!--          <td colspan="2" class='required'>-->
            <!--            <label for="iconfont">是否开启首页地图</label>-->
            <!--          </td>-->
            <!--        </tr>-->
            <!--        <tr class="noborder">-->
            <!--          <td class="vatop rowform onoff"><label for="open_index_map1" class="cb-enable -->
            <?php //if($output['list_setting']['open_index_map'] == '1'){ ?><!--selected--><?php //} ?><!--" ><span>-->
            <?php //echo $lang['open'];?><!--</span></label>-->
            <!--            <label for="open_index_map0" class="cb-disable -->
            <?php //if($output['list_setting']['open_index_map'] == '0'){ ?><!--selected--><?php //} ?><!--" ><span>-->
            <?php //echo $lang['close'];?><!--</span></label>-->
            <!--            <input id="open_index_map1" name="open_index_map" -->
            <?php //if($output['list_setting']['open_index_map'] == '1'){ ?><!--checked="checked"-->
            <?php //} ?><!--  value="1" type="radio">-->
            <!--            <input id="open_index_map0" name="open_index_map" -->
            <?php //if($output['list_setting']['open_index_map'] == '0'){ ?><!--checked="checked"-->
            <?php //} ?><!-- value="0" type="radio"></td>-->
            <!--          <td class="vatop tips"><span class="vatop rowform"></span></td>-->
            <!--        </tr>-->

            <tr>
                <td colspan="2" class='required'>
                    <label for="iconfont">是否开启短信发送</label>
                </td>
            </tr>
            <tr class="noborder">
                <td class="vatop rowform onoff"><label for="open_phone_message1"
                                                       class="cb-enable <?php if ($output['list_setting']['open_phone_message'] == '1') { ?>selected<?php } ?>"><span><?php echo $lang['open']; ?></span></label>
                    <label for="open_index_map0"
                           class="cb-disable <?php if ($output['list_setting']['open_phone_message'] == '0') { ?>selected<?php } ?>"><span><?php echo $lang['close']; ?></span></label>
                    <input id="open_phone_message1" name="open_phone_message"
                           <?php if ($output['list_setting']['open_phone_message'] == '1'){ ?>checked="checked"<?php } ?>
                           value="1" type="radio">
                    <input id="open_phone_message0" name="open_phone_message"
                           <?php if ($output['list_setting']['open_phone_message'] == '0'){ ?>checked="checked"<?php } ?>
                           value="0" type="radio"></td>
                <td class="vatop tips"><span class="vatop rowform"></span></td>
            </tr>

            <tr>
                <td colspan="2" class='required'>
                    <label for="iconfont">海关接口名：</label>
                </td>
            </tr>
            <tr class="noborder">
                <td class="vatop rowform">
                    <select name="custom_interface" id="custom_interface">
                        <?php

                        foreach (glob(dirname(BASE_PATH) . '/custom/*') as $single) {
                            if (is_dir($single)) {
                                ?>
                                <option value="<?php echo basename($single) ?>" <?php if (basename($single) == $output['list_setting']['custom_interface']) echo 'selected'; ?>><?php echo basename($single) ?></option>
                                <?php
                            }
                        }
                        ?>
                    </select>
                    <!-- <input id="custom_interface" name="custom_interface" value="<?php echo $output['list_setting']['custom_interface']; ?>" class="txt" type="text" /> -->
                </td>
                <td class="vatop tips"><span class="vatop rowform">
            保存后会自动更新对应数据表结构
          </span>
                </td>
            </tr>

            <tr>
                <td colspan="2" class="required">
                    <label for="">购买限制：</label>
                </td>
            <tr class='noborder'>
                <td class='vatop rowform'>
                    <textarea name="buyer_limit_info" id="" cols="30"
                              rows="10"><?php echo $output['list_setting']['buyer_limit_info'] ?></textarea>
                </td>
                <td class='vatop tips'>
              <span class='vatop rowform'>
                
              </span>
                </td>
            </tr>
            </tr>

            <tr>
                <td colspan="2" class="required">
                    <label for="">kuaidi100秘钥：</label>
                </td>
            <tr class='noborder'>
                <td class='vatop rowform'>
                    <input type='text' class='type-file-text' name="shipping_key"
                           value='<?php echo $output['list_setting']['shipping_key'] ?>'/>
                </td>
                <td class='vatop tips'>
              <span class='vatop rowform'>
                
              </span>
                </td>
            </tr>
            </tr>


            <!-- <tr>
              <td colspan="2" class='required'>
                <label for="iconfont">代理商申请提交资料：</label>
              </td>
            </tr>
            <tr class="noborder">
              <td class="vatop rowform">
                <input type='hidden' value='proxy_rule' />
                <div class='_box'>

                </div>
                <div class="btn">
                  <a href="javascript:;" class='btn _add'>添加</a>
                  <a href="javascript:;" class='btn _remove'>删除</a>
                </div>
              </td>
              <td class="vatop tips"><span class="vatop rowform">
                {price}表示基础价格（计算所有优惠前的价格）
              </span>
              </td>
            </tr>
            <script>
              (function(){
                var box = $('._box');
                $('._add').click(function(event) {
                  box.append("
                    <div>
                      <label>
                        <input type='checkbox'/>
                      </label>
                      <span>
                        <input type='text' class='name' />
                      </span>
                      <select>
                        <option value='single'>单行文本</option>
                        <option value='multi'>多行文本</option>
                        <option value='upload'>图片上传</option>
                        <option value='select'>选择框</option>

                      </select>
                      <span>
                        <input type='text' class='description' />
                      </span>
                    </div>
                  ");
                });
              })();
            </script> -->


            <!-- <tr class="noborder">
          <td class='vatop rowform'><textarea name="iconfont" id="" rows="6"><?php echo $output['list_setting']['iconfont']; ?></textarea></td>
          <td class='vatop tips'>
           <span class="vatop rowform">你可以在这里输入iconfont的地址</span>
          </td>
        </tr> -->
            <tr>
                <td colspan="2" class="required"><label for="template_name"> 模板设置:</label></td>
            </tr>
            <tr class='noborder'>
                <td class="vatop rowform">
                    <select id="template_name" name="template_name"
                            _selected='<?php echo $output['list_setting']['template_name'] ?>'>
                        <?php
                        $template = get_template_package();
                        //
                        foreach ($template as $k => $t) {
                            ?>
                            <option value="<?php echo $t['__name']; ?>"><?php echo $t['package_name']; ?></option>
                            <?php
                        }
                        ?>
                    </select>
                    <script>
                        var t = $('#template_name');
                        t.val(t.attr('_selected'))

                    </script>
                </td>
            </tr>
            <tr>
                <td colspan="2" class="required"><label for="time_zone"> <?php echo $lang['time_zone_set']; ?>:</label>
                </td>
            </tr>
            <tr class="noborder">
                <td class="vatop rowform"><select id="time_zone" name="time_zone">
                        <option value="-12">(GMT -12:00) Eniwetok, Kwajalein</option>
                        <option value="-11">(GMT -11:00) Midway Island, Samoa</option>
                        <option value="-10">(GMT -10:00) Hawaii</option>
                        <option value="-9">(GMT -09:00) Alaska</option>
                        <option value="-8">(GMT -08:00) Pacific Time (US &amp; Canada), Tijuana</option>
                        <option value="-7">(GMT -07:00) Mountain Time (US &amp; Canada), Arizona</option>
                        <option value="-6">(GMT -06:00) Central Time (US &amp; Canada), Mexico City</option>
                        <option value="-5">(GMT -05:00) Eastern Time (US &amp; Canada), Bogota, Lima, Quito</option>
                        <option value="-4">(GMT -04:00) Atlantic Time (Canada), Caracas, La Paz</option>
                        <option value="-3.5">(GMT -03:30) Newfoundland</option>
                        <option value="-3">(GMT -03:00) Brassila, Buenos Aires, Georgetown, Falkland Is</option>
                        <option value="-2">(GMT -02:00) Mid-Atlantic, Ascension Is., St. Helena</option>
                        <option value="-1">(GMT -01:00) Azores, Cape Verde Islands</option>
                        <option value="0">(GMT) Casablanca, Dublin, Edinburgh, London, Lisbon, Monrovia</option>
                        <option value="1">(GMT +01:00) Amsterdam, Berlin, Brussels, Madrid, Paris, Rome</option>
                        <option value="2">(GMT +02:00) Cairo, Helsinki, Kaliningrad, South Africa</option>
                        <option value="3">(GMT +03:00) Baghdad, Riyadh, Moscow, Nairobi</option>
                        <option value="3.5">(GMT +03:30) Tehran</option>
                        <option value="4">(GMT +04:00) Abu Dhabi, Baku, Muscat, Tbilisi</option>
                        <option value="4.5">(GMT +04:30) Kabul</option>
                        <option value="5">(GMT +05:00) Ekaterinburg, Islamabad, Karachi, Tashkent</option>
                        <option value="5.5">(GMT +05:30) Bombay, Calcutta, Madras, New Delhi</option>
                        <option value="5.75">(GMT +05:45) Katmandu</option>
                        <option value="6">(GMT +06:00) Almaty, Colombo, Dhaka, Novosibirsk</option>
                        <option value="6.5">(GMT +06:30) Rangoon</option>
                        <option value="7">(GMT +07:00) Bangkok, Hanoi, Jakarta</option>
                        <option value="8">(GMT +08:00) Beijing, Hong Kong, Perth, Singapore, Taipei</option>
                        <option value="9">(GMT +09:00) Osaka, Sapporo, Seoul, Tokyo, Yakutsk</option>
                        <option value="9.5">(GMT +09:30) Adelaide, Darwin</option>
                        <option value="10">(GMT +10:00) Canberra, Guam, Melbourne, Sydney, Vladivostok</option>
                        <option value="11">(GMT +11:00) Magadan, New Caledonia, Solomon Islands</option>
                        <option value="12">(GMT +12:00) Auckland, Wellington, Fiji, Marshall Island</option>
                    </select></td>
                <td class="vatop tips"><span
                            class="vatop rowform"><?php echo $lang['set_sys_use_time_zone']; ?>+8</span></td>
            </tr>
            <tr>
                <td colspan="2" class="required"><?php echo $lang['site_state']; ?>:</td>
            </tr>
            <tr class="noborder">
                <td class="vatop rowform onoff"><label for="site_status1"
                                                       class="cb-enable <?php if ($output['list_setting']['site_status'] == '1') { ?>selected<?php } ?>"><span><?php echo $lang['open']; ?></span></label>
                    <label for="site_status0"
                           class="cb-disable <?php if ($output['list_setting']['site_status'] == '0') { ?>selected<?php } ?>"><span><?php echo $lang['close']; ?></span></label>
                    <input id="site_status1" name="site_status"
                           <?php if ($output['list_setting']['site_status'] == '1'){ ?>checked="checked"<?php } ?>
                           value="1" type="radio">
                    <input id="site_status0" name="site_status"
                           <?php if ($output['list_setting']['site_status'] == '0'){ ?>checked="checked"<?php } ?>
                           value="0" type="radio"></td>
                <td class="vatop tips"><span class="vatop rowform"><?php echo $lang['site_state_notice']; ?></span></td>
            </tr>
            <tr>
                <td colspan="2" class="required"><label for="closed_reason"><?php echo $lang['closed_reason']; ?>
                        :</label></td>
            </tr>
            <tr class="noborder">
                <td class="vatop rowform"><textarea name="closed_reason" rows="6" class="tarea"
                                                    id="closed_reason"><?php echo $output['list_setting']['closed_reason']; ?></textarea>
                </td>
                <td class="vatop tips"><span class="vatop rowform"><?php echo $lang['closed_reason_notice']; ?></span>
                </td>
            </tr>
            </tbody>
            <tbody>
            <tr>
                <td colspan="2" class="required">
                    <label for="qk_type">支持的区块币种:</label></td>
            </tr>
            <tr class="noborder">
                <td class="vatop rowform"><textarea name="qk_type" rows="6" class="tarea"
                                                    id="qk_type"><?php echo $output['list_setting']['qk_type']; ?></textarea>
                </td>
                <td class="vatop tips"><span class="vatop rowform">
                        每行一个
                    </span>
                </td>
            </tr>
            </tbody>
            <tfoot id="submit-holder">
            <tr class="tfoot">
                <td colspan="2"><a href="JavaScript:void(0);" class="btn"
                                   onclick="document.form1.submit()"><span><?php echo $lang['nc_submit']; ?></span></a>
                </td>
            </tr>
            </tfoot>
        </table>
    </form>
</div>
<script type="text/javascript">
    // 模拟网站LOGO上传input type='file'样式
    $(function () {
        $("#site_logo").change(function () {
            $("#textfield1").val($(this).val());
        });
        $("#member_logo").change(function () {
            $("#textfield2").val($(this).val());
        });
        $("#seller_center_logo").change(function () {
            $("#textfield3").val($(this).val());
        });
// 上传图片类型
        $('input[class="type-file-file"]').change(function () {
            var filepatd = $(this).val();
            var extStart = filepatd.lastIndexOf(".");
            var ext = filepatd.substring(extStart, filepatd.lengtd).toUpperCase();
            if (ext != ".PNG" && ext != ".GIF" && ext != ".JPG" && ext != ".JPEG") {
                alert("<?php echo $lang['default_img_wrong'];?>");
                $(this).attr('value', '');
                return false;
            }
        });
        $('#time_zone').attr('value', '<?php echo $output['list_setting']['time_zone'];?>');
    });
</script>
